{% extends "base.html" %} {% block head %} {{ super() }}

<script src="{{url_for('static', filename='../static/js/zui.js')}}"
	type="text/javascript" charset="utf-8"></script>
<script>
	$(document).ready(function(){
		oTab = $('#all-property-ad-tabs').ZTab();
		
		//Set active tab menu
		oTab.setActive($('li.z-tab[value="rent"]'));
		
		// Set tab menu click handlers
		$('li.z-tab').click(function(){
			oTab.setActive($(this));
		});
	});
	</script>
{% endblock %} {% block content %}

<ul id="all-property-ad-tabs" class="nav nav-tabs z-tabs">
	<li class="z-tab" value='rent'><a>{{'Rental'}}</a></li>
	<li class="z-tab" value='sell'><a>{{'Sell'}}</a></li>
	<li class="z-tab" value='broker'><a>{{'Broker'}}</a></li>
	<li class="z-tab" value='lawyer'><a>{{'Lawyer'}}</a></li>
</ul>

<div class="list-group">

	{% if infos != None %} {% for info in infos %} {% set ad = info.ad %}
	{% set item = info.item %}
	<div class="col-md-12">
		<img alt="100x100" style="width: 100px; height: 100px;"
			src="{{ info.picture.fpath }}" />
		<div class="row">
			<div class="col-md-8">
				<h4>{{item.name}}</h4>
			</div>
			<div class="col-md-4">
				<h5>${{item.price}}</h5>
			</div>
		</div>
		<div class="row">
			<div class="text-block col-md-12">{{item.description}}</div>
		</div>
	</div>
	<div class="row col-md-12">
		<div class="col-md-3">By {{ad.user.username}}</div>
		<div class="col-md-3">{{ad.created}}</div>
	</div>
	{% endfor %} {% endif %}


</div>

{% endblock %}
